package com.jxstyle.core.common.page;

import java.util.List;

public class PageInfo<T> {

	private long current;
	private long size;
	private List<T> records;
	private long total;

	public PageInfo() {
	}

	public PageInfo(long current, long size) {
		this.current = current;
		this.size = size;
	}

	public List<T> getRecords() {
		return records;
	}

	public void setRecords(List<T> records) {
		this.records = records;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public long getCurrent() {
		return current;
	}

	public void setCurrent(long current) {
		this.current = current;
	}

	public long getSize() {
		return size;
	}

	public void setSize(long size) {
		this.size = size;
	}

	public PageInfo(com.baomidou.mybatisplus.core.metadata.IPage<T> page) {
		this.size = page.getSize();
		this.current = page.getCurrent();
		this.records = page.getRecords();
		this.total = page.getTotal();
	}

}
